var t = getApp();

Page({
    data: {
        timeRepetition: ""
    },
    onLoad: function(t) {
        var o = this;
        t.id && this.setData({
            order_id: t.id
        }), console.log(t.id), wx.showLoading({
            title: "查询中请耐心等候"
        }), this.data.timeRepetition = setInterval(function() {
            o.getData();
        }, 1500);
    },
    copyTxt: function() {
        wx.setClipboardData({
            data: "卡号：".concat(this.data.info.goods_number, " 卡密：").concat(this.data.info.goods_password),
            success: function(t) {
                console.log(t);
            }
        });
    },
    onReady: function() {},
    onShow: function() {},
    onHide: function() {},
    onUnload: function() {},
    onPullDownRefresh: function() {},
    onReachBottom: function(t) {},
    onShareAppMessage: function() {},
    getData: function() {
        var o = this, n = this, a = t.getNetAddresss("plugin.aggregation-cps.api.equity.order-detail");
        t._getNetWork({
            url: a,
            data: {
                order_id: n.data.order_id
            },
            success: function(t) {
                var a = t.data;
                1 == a.result ? (clearInterval(o.data.timeRepetition), wx.hideLoading(), n.setData({
                    info: a.data.coupon_info.coupons[0],
                    datas: a.data
                })) : console.log("查询失败");
            },
            fail: function(t) {
                console.log(t.msg);
            }
        });
    }
});